/*! amazon-dtb-javascript-api - apstag - v7.52.00 - 2020-06-08 10:22:17 */ !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=22)}([function(t,e,n){"use strict";n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return f})),n.d(e,"a",(function(){return b}));var r=n(1),o=n(8),i=n(2),c=n(4),a=n(6),u=Object(r.n)(10),s=[];function d(t,e){var n=2t.length)&&(e=t.length);for(var n=0,r=new Array(e);nwindow.innerHeight)&&(n=200),l.style.background="#eaeded",l.style.zIndex="2147483647",l.style.bottom="0",l.style.position="fixed !important",l.style.display="block !important",l.style.left="0",l.style.right="0",l.style.height="".concat(n,"px"),f.style.cursor="row-resize",f.style.height="2px",f.style.position="absolute",f.style.top="0",f.style.left="0",f.style.right="0",f.style.backgroundColor="RGBA(0,0,0,0)",l.appendChild(f),b.frameBorder="0",b.marginHeight="0",b.marginWidth="0",b.scrolling="no",b.id="apstag-debug-iframe",b.src="about:blank",b.style.display="block",b.style.width="100%",b.style.height="".concat(n,"px"),l.appendChild(b),document.body.appendChild(l),null!==b.contentDocument&&(b.contentDocument.open(),b.contentDocument.write(e),b.contentDocument.close()),f.addEventListener("mousedown",j)}catch(t){Object(u.b)(t,"renderDebugConsole",!0)}}function h(t){try{var e=window.innerHeight-t.clientY;return e<200&&(e=200),l.style.height="".concat(e,"px"),b.style.height="".concat(e,"px"),e}catch(t){return Object(u.b)(t,"resizeDebugConsole",!0),200}}function O(t){try{return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,t.returnValue=!1}catch(t){return Object(u.b)(t,"preventEvent",!0),!1}}function j(){try{void 0===p&&((p=document.createElement("div")).style.position="fixed",p.style.left="0",p.style.right="0",p.style.top="0",p.style.bottom="0",p.style.zIndex="9999999999"),l.appendChild(p),window.addEventListener("mouseup",v),window.addEventListener("mousemove",S)}catch(t){Object(u.b)(t,"resizeBarMouseDownListener",!0)}}function S(t){try{return h(t),O(t)}catch(t){return Object(u.b)(t,"resizeBarMouseMoveListener",!0),!1}}function v(t){try{null!==p&&l.removeChild(p),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",v);var e=h(t);return Object(o.i)()&&window.localStorage.setItem(i.d,"".concat(e)),O(t)}catch(t){return Object(u.b)(t,"resizeBarMouseUpListener",!0),!1}}function _(){try{if(!Object(o.i)())return[];var t=window.localStorage.getItem(i.f);null===t||"false"===t?t="[]":"true"===t&&(t='["fake_bids"]');var e=[];try{e=JSON.parse(t)}catch(t){}return Object(o.k)(e)||(e=[]),e.filter((function(t){return Object(o.j)(i.t,t)}))}catch(t){return Object(u.b)(t,"getCurrentDebugArray"),[]}}function w(t){try{return Object(o.j)(_(),t)}catch(t){return Object(u.b)(t,"isDebugEnabled"),!1}}function D(t,e){try{if(!Object(o.i)())return;if(-1===i.t.indexOf(t))return;var n=_();return e&&-1===n.indexOf(t)?n.push(t):e||(n=n.filter((function(e){return e!==t}))),0===n.length?window.localStorage.removeItem(i.f):window.localStorage.setItem(i.f,JSON.stringify(n)),I(),1}catch(e){return void Object(u.b)(e,"setDebugMode")}}function E(t){var e=1c.l)return e}catch(t){Object(i.b)(t,"parseTimeout",!0)}return!1}function y(t,e){try{var n=m(t.timeout);return!1===n&&(n=m(e.config.bidTimeout)),!1===n&&(n=m(e.cfg.DEFAULT_TIMEOUT)),n}catch(t){return Object(i.b)(t,"getTimeout",!0),2e3}}function h(t,e){var n,r=!1;function o(e){if(!r)try{t(e)}catch(e){Object(i.b)(e,"executeFunctionOnceWithTimeout-wrappedFunction",!0)}clearTimeout(n),r=!0}try{return n=setTimeout(o,e,!0),o.bind(null,!1)}catch(e){return Object(i.b)(e,"executeFunctionOnceWithTimeout",!0),function(){}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m})),n.d(e,"b",(function(){return y})),n.d(e,"d",(function(){return h})),n.d(e,"h",(function(){return O})),n.d(e,"e",(function(){return j})),n.d(e,"c",(function(){return S})),n.d(e,"i",(function(){return v})),n.d(e,"g",(function(){return _})),n.d(e,"f",(function(){return w}));var r=n(2),o=n(4),i=n(3),c=n(1),a=n(9),u=n(0),s=n(6),d=n(11),l=n(10);function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;e24e4)&&(!(Object(c.m)(e,"url")&&!Object(c.b)(e.url,Object(s.f)(window)))&&t.bidState!==i.b.rendered)}catch(e){return Object(u.b)(e,"isBidEligible"),!1}}function w(t){try{var e=t.map(l.c),n=r.a.getState();return Object.keys(n.slotBids).filter((function(t){return Object(c.j)(e,t)})).reduce((function(t,e){var o=n.slotBids[e].filter((function(t){return t.bidState===i.b.new})).filter(_);if(0t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.rqTs?t:e})).bid)}))}catch(t){Object(Vt.b)(t,"_getCurrentSlotBids",!0)}return t}function w(t,e){try{return Object(Ut.k)(Nt.a.getState().targetingKeys[t])?e?["amzniid_sp"]:Nt.a.getState().targetingKeys[t].filter((function(t){return-1apstag Test Creative":"","

amzniid - ").concat(t.bidID," | amznbid: ").concat(t.pp," | size: ").concat(t.sizes.join("x"),"

");r.src="javascript:'".concat(o,"'")}else r.src=x(t);t.isAmp&&t.isSf&&Object(Ht.b)(window)&&Object(Ht.a)(t.sizes,window),z(t.doc,r),(e.iframe=r).onload=function(){e.states.iframeLoaded=!0,n&&n()}}catch(t){Object(Vt.b)(t,"_loadAdIntoUnfriendlyIframe",!0)}}function F(t){var e=t.states,n=t.doc,r=t.bidID,o=t.iframe;try{if(Object(Ut.a)(e))return;var i;e.shouldRunViewability=!1,Object(Ut.m)(window,"amzncsm")?i=window.amzncsm:void 0!==n&&null!==n.defaultView&&Object(Ut.m)(n.defaultView,"amzncsm")&&(i=n.defaultView.amzncsm),void 0!==n&&void 0!==i&&Object(Ut.m)(i,"rmD")&&(i.host=Object(Ft.c)("host",Nt.a.getState().hosts.DEFAULT_AAX_PIXEL_HOST),i.rmD(o,r,n.defaultView,n,Nt.a.getState().config.pubID))}catch(t){Object(Vt.b)(t,"_triggerViewability")}}function G(t,e){return function(n){try{var r=Object(Yt.f)(e.slots),o=Object.keys(r),i=[];n&&(Nt.a.dispatch({type:"RECORD_AAX_REQ_PROP",bidReqID:e.bidReqID,key:"timedOutAt",value:Date.now()}),Nt.a.getState().experiments.chunkRequests&&Nt.a.dispatch({type:"RECORD_TIMEOUT",fid:e.bidReqID,timeOut:Date.now()})),o.forEach((function(t){if(Object(Ut.m)(r,t)){var e=r[t];Object(Yt.h)(Nt.a.getState(),Wt.a)||Object(Ut.m)(e.bidConfig,"amznbid")?Object(Ut.m)(e.bidConfig,"amznp")||(e.bidConfig.amznp=""):e=Object(Yt.e)(e.slotID,Gt.r.noBid),i.push(e)}})),Wt.a.isSupported&&(i=Object(Yt.c)(i,e,n));var c={fromTimeout:n},a=Object(Yt.h)(Nt.a.getState(),Wt.a);t(i.map((function(t){return a?t.newBidObject:t.bidObject})),c)}catch(n){Object(Vt.b)(n,"_bidCallbackHandler",!0)}}}function Q(t,e){try{var n;n=t.defaultView&&t.defaultView.frameElement?t.defaultView.frameElement:window.frameElement,e.inheritSize||(n.width=e.sizes[0],n.height=e.sizes[1])}catch(t){Object(Vt.b)(t,"_resizeIframe")}}function H(t){try{return"".concat(t[0],"x").concat(t[1])}catch(t){return Object(Vt.b)(t,"_sizeArrayToSring"),"x"}}function X(t){try{return 1===t.length?H(t[0]):H(t[Math.floor(t.length*Math.random())])}catch(t){return Object(Vt.b)(t,"_pickRandomSizeForMockBid",!0),""}}function V(t,e){try{var n,r=Object(Ft.c)("host",Nt.a.getState().hosts.DEFAULT_AAX_BID_HOST),o=Object(qt.f)(window),i=t.bidReqID,c=Object(Ut.h)(window),a=Object(Ft.c)("testBidTimeout",200);Nt.a.dispatch({type:"RECORD_AAX_REQUEST",data:{bidConfig:t,timeout:a,bidReqID:i,ws:c,url:o,rqTs:Date.now()}}),n=t.slots.map((function(t){var e,n=X(t.sizes),r="testDeal".concat(Object(Ut.e)(),"_").concat(n),o="testDealIi-".concat(Object(Ut.e)()),i=X(t.sizes),c=(re(e={slotID:t.slotID,crid:"".concat(Gt.m.crid,"-").concat(Object(Ut.e)()),size:i,amzniid:"".concat(Gt.m.amzniid,"-").concat(Object(Ut.e)()),amznbid:Gt.m.amznbid,amznp:Gt.m.amznp,amznsz:i,amzniid_sp:"".concat(Gt.m.amzniid,"-").concat(Object(Ut.e)()),amznbid_sp:"".concat(Gt.m.amznbid,"SP"),amznp_sp:"".concat(Gt.m.amznp,"SP"),amznsz_sp:X(t.sizes),amzndeals:[r]},"".concat(r,"amzniid"),o),re(e,"mediaType","d"),re(e,"meta",["slotID","mediaType","size"]),re(e,"targeting",["amzniid","amznbid","amznp","amznsz","amzniid_sp","amznbid_sp","amznp_sp","amznsz_sp","amzndeal_sp","amzndeals","".concat(r,"amzniid")]),e);"video"===t.mediaType&&(c.mediaType="video",c.amznbid="v_".concat(c.amznbid));var a=new Yt.a(c);return Object(Yt.h)(Nt.a.getState(),Wt.a)?a.newBidObject:a.bidObject})),setTimeout((function(){window.apstag.bids({slots:n,host:r,status:"ok",cb:i}),e(!0)}),a)}catch(t){Object(Vt.b)(t,"_doMockBid",!0)}}function K(t){try{var e=Nt.a.getState().AAXReqs.filter((function(e){return e.bidReqID===t.cb}))[0];if(e&&e.bidConfig&&e.bidConfig.slots){var n=e.bidConfig.slots.filter(Mt.d).map((function(t){return t.slotID})),r=Object(Ut.m)(t,"slots")?t.slots.map((function(t){return t.slotID})):[],o=n.filter((function(t){return!Object(Ut.j)(r,t)}));Nt.a.dispatch({type:"NO_BID_ON_ADSERVER_SLOTS",slotIDs:o}),Wt.a.hasAdServerObjectLoaded()?Y():Wt.a.isCommandQueueDefined()&&Wt.a.cmdQueuePush((function(){Y()}))}}catch(e){Object(Vt.b)(e,"_determineNoBidStateForAdServerObject")}}function J(t){return Object(Ut.j)(Nt.a.getState().AAXReqs.filter((function(t){return!t.resTs})).map((function(t){return t.bidConfig.slots})).reduce((function(t,e){return t.concat(e)}),[]).map(Mt.c),t)}function W(t){try{var e=t.getTargeting("amznbid");return 0=i.length&&i.slice(i.length-1)[0].ts>c.slice(i.length-1)[0].ts?1===t[n].fetchWithIID.filter((function(t){return t===r.bidConfig.amzniid})).length?o.state=1:o.state=4:Object(Ut.j)(t[n].fetchWithIID,r.bidConfig.amzniid)?o.state=3:o.state=2:o.state=0,1===o.state||2===o.state){var a=Nt.a.getState().AAXReqs.filter((function(t){return t.bidReqID===r.bidReqID}))[0].resTs,u=bt(a,t[n].fetchedAt,2===o.state);u&&Object(Ut.m)(u,"ts")&&(o.delta=a-u.ts)}e.push(o)}}))})),e}catch(t){return Object(Vt.b)(t,"_getBidSetInfo"),[]}}function bt(t,e,n){var r=e.map((function(e){var r=t-e.ts;return!n&&r<=0?-r:n&&0<=r?r:null}));return e[pt(r)]}function pt(t){for(var e=-1,n=-1,r=0;r